<template>
    <div style="text-align: center">
        <h4>请点击下方登录 😅</h4>

        <div class="work-panel">
            <div class="panel">
                <div class="panel-item">
                    <div>
                        <i class="el-icon-s-platform"></i>
                        <span>登录</span>
                    </div>
                    <el-form ref="loginRef" :model="loginForm" class="login-form">
                        <el-form-item prop="username">
                            <el-input
                                v-model="loginForm.username"
                                type="text"
                                auto-complete="off"
                                placeholder="账号"
                            ></el-input>
                        </el-form-item>
                        <el-form-item prop="password">
                            <el-input
                                v-model="loginForm.password"
                                type="password"
                                auto-complete="true"
                                placeholder="密码"
                            ></el-input>
                        </el-form-item>
                        <el-form-item style="width:100%;">
                            <el-button
                                size="large"
                                type="primary"
                                style="width:100%;"
                                @click.prevent="toLogin"
                            >
                                <span>登 录</span>
                            </el-button>
                            <div style="float: right;"></div>
                        </el-form-item>
                    </el-form>
                </div>
            </div>
        </div>
    </div>
</template>

<script setup name="Login">
import { setToken } from '../utils/auth';
const router = useRouter();
const { proxy } = getCurrentInstance();
const loginForm = ref({
    username: "admin",
    password: "123456",
    code: "1",
    uuid: "1"
});
function toLogin(){
  //  console.log(loginForm.value)

};
</script>

<style lang="less" scoped>
.login-form {
    border-radius: 6px;
    background: #ffffff;
    width: 400px;
    padding: 25px 25px 5px 25px;
    .el-input {
        height: 38px;
        input {
            height: 38px;
        }
    }
    .input-icon {
        height: 39px;
        width: 14px;
        margin-left: 2px;
    }
}
h4 {
    margin: 0 auto;
    color: #38adff;
    margin-top: 150px;
}

.user {
    position: absolute;
    left: 20%;
    margin-top: 20px;
    div {
        margin-left: 20px;
        display: inline-block;
    }
}

.work-panel {
    text-align: left;
    display: flex;
    justify-content: center;
    position: relative;
    .panel {
        margin-top: 80px;
        max-width: 700px;
        display: flex;
        justify-content: center;

        .panel-item {
            cursor: pointer;
            margin: 0 40px;
            width: 450px;
            padding: 10px;
            display: inline-block;
            background: #ffffff;
            border-radius: 10px;
            border: 1px solid #ffffff;
            box-shadow: 1px 1px 8px 0 #b0b0b1;

            div:nth-child(1) {
                color: #7a7a7a;
                font-weight: bold;
                height: 60px;
                line-height: 60px;
                font-size: large;
                border-bottom: 1px solid #cccdcd;

                span {
                    margin-left: 30px;
                }
            }

            i {
                padding: 8px;
                color: #ffffff;
                background: #2594ff;
                font-size: 25px;
                border-radius: 5px;
            }

            .el-icon-s-platform {
                background: rgb(255, 148, 62);
            }

            p {
                padding: 10px 0;
                color: #7a7a7a;
                font-size: medium;
            }
        }
    }
}
</style>
